<!doctype html>
<html>
<head>
<meta charset="<?php echo $cfg_soft_lang; ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="applicable-device" content="pc,mobile">
<title><?php echo $cfg_webname;?>_友情链接列表</title>
<link href="<?php echo $cfg_templets_skin; ?>/style/bootstrap.css" rel="stylesheet" type="text/css" />
</head>
<body class="bg-light">
<div class="container">
  <h2 class="mt-3" style="display: inline;"><a href="<?php echo $cfg_basehost;?>" title="<?php echo $cfg_webname;?>"><img src="<?php echo $cfg_templets_skin; ?>/images/logo.png" alt="<?php echo $cfg_webname;?>"/></a> </h2>
  <h1 style="display: inline;"><?php echo $cfg_webname;?>友情链接列表</h1>
  <hr class="my-3 border" />
  <div class="mb-3">当前位置:<a href="<?php echo $cfg_basehost;?>" title="<?php echo $cfg_webname;?>" target="_blank"><?php echo $cfg_webname;?></a> > 友情链接列表
  <div style="display: inline;"> <a href="<?php echo "$cfg_phpurl/flink_add.php"; ?>">在线申请友情链接</a> </div>
  </div>
</div>
<div class="container-xl">
  <div class="row">
    <ul class="list-group list-group-horizontal">
      <?php
		  $row = 180;
		  $titlelen = 50;
		  $dsql->SetQuery("Select * from `#@__flink` where ischeck>0 order by sortrank asc");
		  $dsql->Execute();
		$revalue = "";
		for($i=1;$i<=$row;$i++)
		{

				if($dbrow=$dsql->GetObject())
				{
					$wtitle = cn_substr($dbrow->webname,$titlelen);
					if($dbrow->logo=="")
						$revalue.= "<li class='list-group-item'><a href='".$dbrow->url."' target='_blank'>$wtitle</a></li>";
					else
						$revalue.= "<li class='list-group-item'><a href='".$dbrow->url."' target='_blank'><img src='".$dbrow->logo."' width='88' height='31' border='0' alt='$wtitle'></a></li>";
				}
			if(!$dbrow) break;
		}
		echo  $revalue;
		  ?>
    </ul>
  </div>
</div>
<div class="container-xl">
  <hr class="my-3 border" />
  <p class="my-3"> Powered by <?php echo $cfg_webname;?> &copy; 2019-<?php echo $showtime=date("Y");?>&nbsp;&nbsp;<?php echo $cfg_beian; ?> 
</div>
</p>
</div>
<script language="javascript" type="text/javascript" src="<?php echo $cfg_templets_skin; ?>/js/jquery-3.4.1.slim.min.js" ></script> 
<script language="javascript" type="text/javascript" src="<?php echo $cfg_templets_skin; ?>/js/popper.min.js" ></script> 
<script language="javascript" type="text/javascript" src="<?php echo $cfg_templets_skin; ?>/js/bootstrap.min.js" ></script>
</body>
</html>
